﻿@using static AutoMail.Enums.ComponentEnums
@model AutoMail.Models.EmailJob

@{
    ViewData["Title"] = "Edit";
}

<h1>Edit</h1>

<h4>EmailJob</h4>
<hr />
<div class="row">
    <div class="col-md-4">
        <form asp-action="Edit">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <input type="hidden" asp-for="Id" />
            <div class="form-group">
                <label asp-for="StaffName" class="control-label"></label>
                <input asp-for="StaffName" class="form-control" />
                <span asp-validation-for="StaffName" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Sex" class="control-label"></label>
                <p class="m-sm-2">
                @foreach (var sexItem in (ESex[])Enum
                        .GetValues(typeof(ESex)))
                {
                    <input type="radio" class="form-check-input" asp-for="Sex" value="@((byte)sexItem)">
                    <label class="form-check-label" asp-for="Sex">@sexItem</label>
                }
                </p>
                <span asp-validation-for="Sex" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="BirthDay" class="control-label"></label>
                <input asp-for="BirthDay" class="form-control" />
                <span asp-validation-for="BirthDay" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Email" class="control-label"></label>
                <input asp-for="Email" class="form-control" />
                <span asp-validation-for="Email" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="EmailBody" class="control-label"></label>
                <textarea asp-for="EmailBody" class="form-control"></textarea>
                <span asp-validation-for="EmailBody" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="ComeToCompanyDate" class="control-label"></label>
                <input asp-for="ComeToCompanyDate" class="form-control" />
                <span asp-validation-for="ComeToCompanyDate" class="text-danger"></span>
            </div>
            <div class="m-sm-2 form-group">
                <input type="submit" value="Save" class="btn btn-primary" />
            </div>
        </form>
    </div>
</div>

<div>
    <a asp-action="Index">Back to List</a>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
